import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      components: {
        tpl: () => import('@/views/basic/index.vue'),
        render: () => import('@/views/basic/index.js'),
        jsx: () => import('@/views/basic/index.jsx')
      }
    },
    {
      path: '/directives',
      components: {
        tpl: () => import('@/views/directives/index.vue'),
        render: () => import('@/views/directives/index.js'),
        jsx: () => import('@/views/directives/index.jsx')
      }
    },
    {
      path: '/v-model',
      components: {
        tpl: () => import('@/views/v-model/index.vue'),
        render: () => import('@/views/v-model/index.js'),
        jsx: () => import('@/views/v-model/index.jsx')
      }
    },
    {
      path: '/slot',
      components: {
        tpl: () => import('@/views/slot/index.vue'),
        render: () => import('@/views/slot/index.js'),
        jsx: () => import('@/views/slot/index.jsx')
      }
    },
    {
      path: '/scoped-slot',
      components: {
        tpl: () => import('@/views/scoped-slot/index.vue'),
        render: () => import('@/views/scoped-slot/index.js'),
        jsx: () => import('@/views/scoped-slot/index.jsx')
      }
    },
    {
      path: '/functional',
      components: {
        tpl: () => import('@/views/functional/index.vue'),
        render: () => import('@/views/functional/index.js'),
        jsx: () => import('@/views/functional/index.jsx')
      }
    }
  ]
})
